/* SPDX-License-Identifier: GPL-2.0
 * Copyright (c) Huawei Technologies Co., Ltd. 2024-2024. All rights reserved.
 * Description: usb_class driver Vendor Hooks
 */

#ifdef CONFIG_VENDOR_USBLP_HOOKS
#undef TRACE_SYSTEM
#define TRACE_SYSTEM usb_class

#define TRACE_INCLUDE_PATH trace/hooks
#if !defined(_TRACE_HOOK_USB_CLASS_H) || defined(TRACE_HEADER_MULTI_READ)
#define _TRACE_HOOK_USB_CLASS_H
#include <linux/tracepoint.h>
#include <trace/hooks/vendor_hooks.h>

struct usb_device;
struct device;
struct usblp;
struct hw_event_usbdev_para_t;
struct usb_interface;

DECLARE_HOOK(vendor_acm_get_hw_info,
	TP_PROTO(struct usb_device *usb_dev, struct device *tty_dev),
	TP_ARGS(usb_dev, tty_dev));

DECLARE_HOOK(vendor_usblp_get_hw_info,
	TP_PROTO(struct usblp *usblp_ptr),
	TP_ARGS(usblp_ptr));

DECLARE_HOOK(vendor_acm_tty_action,
	TP_PROTO(int action, struct hw_event_usbdev_para_t *pst_para),
	TP_ARGS(action, pst_para));

DECLARE_HOOK(vendor_usblp_action,
	TP_PROTO(int action, struct usb_interface *intf),
	TP_ARGS(action, intf));

#endif
/* This part must be outside protection */
#include <trace/define_trace.h>

#else

#include <linux/tracepoint.h>

struct usb_device;
struct device;
struct usblp;
struct hw_event_usbdev_para_t;
struct usb_interface;

DECLARE_EVENT_NOP(vendor_acm_get_hw_info,
	TP_PROTO(struct usb_device *usb_dev, struct device *tty_dev),
	TP_ARGS(usb_dev, tty_dev));

DECLARE_EVENT_NOP(vendor_usblp_get_hw_info,
	TP_PROTO(struct usblp *usblp_ptr),
	TP_ARGS(usblp_ptr));

DECLARE_EVENT_NOP(vendor_acm_tty_action,
	TP_PROTO(int action, struct hw_event_usbdev_para_t *pst_para),
	TP_ARGS(action, pst_para));

DECLARE_EVENT_NOP(vendor_usblp_action,
	TP_PROTO(int action, struct usb_interface *intf),
	TP_ARGS(action, intf));

#endif  /* CONFIG_VENDOR_USBLP_HOOKS */
